package com.matt.repository.impl;

import com.matt.repository.base.BaseNativeSqlRepository;
import com.matt.repository.base.CourseChangeStaffRepository;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/9/28
 * *******************************
 */
@Component
public class CourseChangeStaffRepositoryImpl extends BaseNativeSqlRepository implements CourseChangeStaffRepository{

    @Override
    public List<Object[]> findRecordsByChildren(String childrenId) {
        String findTeacherSql=String.format("select r.delta, r.remark, r.created, r.operatorName"
                + " from children_course_change_record r where r.childrenId = '%s' order by created desc", childrenId);
        List<Object[]> objectArrayList = sqlArrayList(findTeacherSql);
        return objectArrayList;
    }
}
